package com.bean;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@Data
@Slf4j
public class Bean1 {

    public Bean1() {
        System.out.println("构造bean1");
    }

    private ExcelDataSource excelDataSource;
    private Bean2 bean2;
    private RedisConnectionFactory redisConnectionFactory;

    @Autowired
    public void setBean2(Bean2 bean2) {
        log.info("自动注入Bean2 {}",bean2);
        this.bean2 = bean2;
    }
}
